import cv2 as cv


def main():
    img = cv.imread('../data/test.png')
    if img is None:
        print("牛爷爷, 俺滴图图呢")
        exit(0)

    b, g, r = img[:, :, 0], img[:, :, 1], img[:, :, 2]
    cv.imshow("Press any key to next", b)
    cv.waitKey(0)

    cv.imshow("Press any key to next", g)
    cv.waitKey(0)

    cv.imshow("Press any key to next", r)
    cv.waitKey(0)

    merge = cv.merge((b, g, r))
    cv.imshow("Press any key to next", merge)
    cv.waitKey(0)

    cv.destroyAllWindows()


if __name__ == "__main__":
    main()
